//
//  ZFActivityView.h
//  components
//
//  Created by linzaifei on 2021/7/13.
//

#import <UIKit/UIKit.h>
#import "ZFActivityBackgroundView.h"

NS_ASSUME_NONNULL_BEGIN


typedef NS_ENUM(NSInteger, ActivityAnimation) {
    /// Opacity
    ActivityAnimationFade,
    /// Opacity + scale
    ActivityAnimationZoom,
    /// Opacity + scale
    ActivityAnimationZoomOut,
    /// Opacity + scale
    ActivityAnimationZoomIn,
    /// Opacity+ bottom
    ActivityAnimationPopBottom,
    /// Opacity+ right
    ActivityAnimationPopRight,
    ///Opacity+ top
    ActivityAnimationPopTop,
    ///Opacity+ left
    ActivityAnimationPopLeft
};
@interface ZFActivityView : UIView
///初始化
-(instancetype)initWithView:(UIView *)view;

@property(nonatomic,strong,readonly)ZFActivityBackgroundView *backgroundView;
@property(nonatomic,strong,readonly)ZFActivityBackgroundView *contentView;
///动画样式
@property (assign, nonatomic) ActivityAnimation animationType;
///动画时间 默认0.3
@property(nonatomic,assign)NSTimeInterval duration;
///结束完成后需不需要移除 默认 NO
@property(nonatomic,assign)BOOL needRemoveSuperView;
///点击背景是不是可以隐藏 默认NO
@property(nonatomic,assign)BOOL canTouchBackground;



///开始动画
-(void)showAnimated:(BOOL)animated;
///结束动画
-(void)hideAnimated:(BOOL)animated;
///延迟多久结束
-(void)hideAnimated:(BOOL)animated delay:(NSTimeInterval)delay;

@end





NS_ASSUME_NONNULL_END



